﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kooboo.IoC;

namespace Kooboo.Commerce.Contexts.Carts
{
    public static class EditorBehavior
    {
        public static IQueryable<ICartItem> QueryCartItems(this IEditor actor)
        {
            return ContextContainer.Current.Resolve<ICartItemRepository>().CartItems;
        }

        public static void Delete(this IEditor actor, ICartItem cartItem)
        {
            ContextContainer.Current.Resolve<ICartItemRepository>().Delete(cartItem);
        }
    }
}
